home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
tex
/
dvivga9.zip
/
MACHDEFS.H
< prev
next >
Wrap
C/C++ Source or Header
|
1988-06-15
|
26KB
|
834 lines
/* -*-C-*- machdefs.h */
/*-->machdefs*/
/**********************************************************************/
/****************************** machdefs ******************************/
/**********************************************************************/
/***********************************************************************
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
This file should contain definitions for symbols used for all operating
system / implementation dependencies, and if the driver family has
already been implemented on you machine, this should be the only file
requiring changes.
How to change this file:
* locate the operating system and implementation definitions;
they are surrounded by "=====" comment strings.
* comment out the definitions you do not want, and select the
ones for your system
* if adding a new operating system, create a new symbol OS_xxx
for it and add a new #if OS_xxx ... #endif section for its
changes.
* if adding a new implementation for an existing operating
system, create a new symbol for it and add appropriate
conditionals inside its #if OS_xxx ... #end section.
* if you must replace a standard C library function, replace
instances of its use in the source code with an upper-case
equivalent (e.g. ungetc --> UNGETC), then define the
upper-case name below in the generic section, plus the
operating-system section.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
List of symbols actually used for #if's [14-Aug-87]
Flags and strings:
ALLOW_INTERRUPT -- allow interactive interrupt
ANSI_PROTOTYPES -- draft ANSI C function prototype declarations are
supported
ANSI_LIBRARY -- draft ANSI C library functions conformance
ARITHRSHIFT -- implementation uses arithmetic (not logical) right
shift
DVIHELP -- how to find documentation (for usage())
DVIPREFIX -- prefix to standard 3-character extension of output
and log files
FASTZERO -- fast bitmap zeroing by external assembly language
routine
FONTLIST -- font type search list (PK, GF, PXL)
FONTPATH -- font directory path
HIRES -- high resolution variant of bitmap output
HOST_WORD_SIZE -- host integer word size in bits
PS_MAXWIDTH -- approximate line width limit for PostScript output
PS_SHORTLINES -- shorter output lines in PostScript
PS_XONXOFFBUG -- PostScript version 23.0 Xon/Xoff bug workaround
PXLID -- TeX PXL file ID
RB_OPEN -- fopen() mode flags for binary read
SEGMEM -- segmented memory (Intel); bitmap is raster vector
STDRES -- standard resolution (200 dpi)
SUBPATH -- substitution font file path
TEXFONTS -- TeX font file path environment variable
TEXINPUTS -- TeX input file path environment variable
USEGLOBALMAG -- allow runtime global magnification scaling
VIRTUAL_FONTS -- implement virtual font caching
WB_OPEN -- fopen() mode flags for binary write
ZAPTHISOUT -- remove some obsolete code
Alternate library routines for misfeature workarounds (these have the
same names as standard library routines, but upper-cased):
EXIT
FOPEN
FSEEK
FTELL
GETENV
MALLOC(n)
READ
REWIND(fp)
UNGETC
C Implementations:
ATT -- AT&T Unix (System III, V)
BSD41 -- Berkeley 4.1BSD
BSD42 -- Berkeley 4.2BSD
HPUX -- HP 9000 series Unix (System V based)
IBM_PC_LATTICE -- IBM PC Lattice C compiler
IBM_PC_MICROSOFT-- IBM PC Microsoft Version 3.x or later C compiler
IBM_PC_WIZARD -- IBM PC Wizard C compiler
KCC_20 -- SRI's KCC Compiler on TOPS-20
PCC_20 -- Portable C Compiler on TOPS-20
Operating systems:
OS_ATARI -- Atari 520ST+ TOS (similar to MS DOS)
OS_PCDOS -- IBM (and clones) PC DOS and MS DOS
OS_TOPS20 -- DEC-20 TOPS-20
OS_UNIX -- Unix (almost any variant)
OS_VAXVMS -- VAX VMS
Device names (defined in each DVIxxx.C file):
APPLEIMAGEWRITER -- Apple ImageWriter printer
BBNBITGRAPH -- BBN BitGraph terminal
CANON_A2 -- Canon LBP-8 A2 laser printer
DECLA75 -- DEC LA75 printer
DECLN03PLUS -- DEC LN03-PLUS laser printer
EPSON -- Epson 9-pin family dot-matrix printer
GOLDENDAWNGL100 -- Golden Dawn GL100 laser printer
HPJETPLUS -- Hewlett-Packard Laser Jet Plus (downloaded fonts)
HPLASERJET -- Hewlett-Packard Laser Jet (bitmap display)
IMPRESS -- imPRESS (IMAGEN laser printer)
MPISPRINTER -- MPI Sprinter printer
OKIDATA2410 -- OKIData 2410 printer
POSTSCRIPT -- Adobe PostScript (Apple LaserWriter laser printer)
PRINTRONIX -- Printronix (DEC LXY-11, C-Itoh) printer
TOSHIBAP1351 -- Toshiba P-1351 dot matrix printer
***********************************************************************/
/**********************************************************************
Define all symbols for devices, operating systems, and implementations
to be explicitly 0, unless it is expected that they might be set at
compile time.
***********************************************************************/
#define ALLOW_INTERRUPT 0
#define ANSI_PROTOTYPES 0
#ifndef ANSI_LIBRARY /* may be specified at compile time */
#define ANSI_LIBRARY 0
#endif
#if ANSI_LIBRARY
#undef ANSI_PROTOTYPES
#define ANSI_PROTOTYPES 1 /* If library conforms, declarations do too */
#endif
#define ARITHRSHIFT 1 /* most C compilers use arithmetic right shift */
#define DISKFULL(fp) (ferror(fp) && (errno == ENOSPC))
#define DVIEXT ".dvi"
#define DVIPREFIX "dvi-"
#define EXIT exit
#define FASTZERO 0
/* The following definitions work for at least PCC-20, BSD 4.2 and 4.3,
and HPUX; VAX VMS has an extra level of indirection. Check the
definition of fileno(fp) in stdio.h; on PCC-20, it is
#define fileno(p) ((p)->_file)
*/
#define FILE_CNT(fp) (fp)->_cnt
#define FILE_BASE(fp) (fp)->_base
#define FILE_PTR(fp) (fp)->_ptr
/* #define FONTLIST 0 -- can be set at compile time */
/* #define FONTPATH 0 -- can be set at compile time */
#define FOPEN fopen
#define FSEEK fseek
#define FTELL ftell
#define GETENV getenv
#define HIRES 0
#define MALLOC(n) malloc(n)
#define MAXDRIFT 2 /* we insist that
abs|(hh-pixel_round(h))<=MAXDRIFT| */
/* MAXOPEN should be 6 less than the system limit on open files,
allowing for files open on stdin, stdout, stderr, .dvi, .dvi-log,
.dvi-xxx, plus MAXOPEN font files. It may be additionally limited by
the amount of memory available for buffers (e.g. IBM PC). */
#define MAXOPEN 14
/* #define PS_MAXWIDTH 72 -- can be set at compile time */
/* #define PS_SHORTLINES 0 -- can be set at compile time */
#define PS_XONXOFFBUG 0
#define PXLID 0
#define RB_OPEN "r"
/* For virtual font caching to succeed, read() must return the requested
number of bytes, and preferably do this with one system call and no
double buffering. */
#define READ read
/* In many implementations, rewind(fp) is defined as equivalent to
fseek(fp,0L,0). In some, however (e.g. PCC-20, and probably others
based on PCC), it additionally discards input buffer contents, which may
cause unnecessary I/O, and in the case of virtual font caching, clears
the cache. Defining it in terms of fseek() should be okay, but the
implementation of fseek() should be checked. */
#define REWIND(fp) FSEEK(fp,0L,0)
#define SEGMEM 0 /* may be reset by dvixxx for big bitmaps */
#define STDRES 0
/* #define SUBPATH 0 -- can be set at compile time */
#define SUBEXT ".sub"
#define SUBNAME "texfonts"
/* #define TEXFONTS 0 -- can be set at compile time */
/* #define TEXINPUTS 0 -- can be set at compile time */
#define UNGETC ungetc
#define USEGLOBALMAG 0
#define WB_OPEN "w"
#define ZAPTHISOUT 0
/**********************************************************************/
/* Clear all implementation/operating-system flags--reset later */
#define ATT 0 /* define zero or one of these */
#define BSD41 0
#define BSD42 0
#define HPUX 0
#define IBM_PC_LATTICE 0
#define IBM_PC_MICROSOFT 0
#define IBM_PC_WIZARD 0
#define KCC_20 0
#define PCC_20 0
#define OS_ATARI 0 /*